package com.dg.tmall.syn.service.impl;

import org.springframework.dao.DataAccessException;
import org.springframework.security.userdetails.UserDetails;
import org.springframework.security.userdetails.UserDetailsService;
import org.springframework.security.userdetails.UsernameNotFoundException;

import com.jq.invoicing.test.dao.ISysuserDAO;
import com.jq.invoicing.test.vo.Person;

public class UserDetailsSerivceImpl implements UserDetailsService {

	private ISysuserDAO iDao;
	
	public UserDetails loadUserByUsername(String account)
			throws UsernameNotFoundException, DataAccessException {
		// TODO Auto-generated method stub
		UserDetails user=(Person)iDao.getPersonByAccount(account);
        return user;
	}

	public ISysuserDAO getiDao() {
		return iDao;
	}

	public void setiDao(ISysuserDAO iDao) {
		this.iDao = iDao;
	}

}
